#pragma once

#include "Engine/Engine Classes/GeometryObject/GeometryObject.h"
#include "Engine/Engine Classes/MeshFormats/ObjLoader.h"
#include "Engine/Engine Classes/SceneTree/SceneTree.h"
#include "Engine/PreApi Classes/VertexDeclaration/VertexDeclaration.h"
#include "Engine/PreApi Classes/DrawInterface/DrawInterface.h"
#include "Engine/PreApi Classes/IAInterface/IAInterface.h"
#include "Engine/PreApi Classes/Texture/Texture2D.h"
#include "Engine/PreApi Classes/Shader/VShader.h"

class CMesh: 
    public CSceneNode, 
    public CIAInterface,
    public CDrawInterface,
    public CGeometryObject
{
private:
    CObjLoader *m_pObjLoader;
    CTexture2D *m_pTexture;
    mUInt       m_uVertexCount;
    mUInt       m_uIndexCount;

    virtual mUInt NumPolygons ( );

public:
    CMesh                ( mString a_sFileName );
    ~CMesh               ( );

    /* Creating VDecl, buffers */
    mVoid InitMesh       ( CVShader *a_pVShader );
    mVoid SetTexture     ( CTexture2D *a_pTexture );
    mString &TexturePath ( );
    mVoid SendMaterial   ( CIShader *a_pIShader );
    

    mVoid Render         ( );
};